<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>班级信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f9;
            color: #333;
        }
        h1, h3 {
            text-align: center;
            color: #4CAF50;
        }
        table {
            width: 80%;
            margin: 20px auto;
            border-collapse: collapse;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        table, th, td {
            border: 1px solid #ddd;
        }
        th, td {
            padding: 12px;
            text-align: center;
        }
        th {
            background-color: #4CAF50;
            color: white;
        }
        tr:nth-child(even) {
            background-color: #f2f2f2;
        }
        tr:hover {
            background-color: #eafaf1;
        }
    </style>
</head>
<body>

<h1>班级信息</h1>
<table>
    <tr>
        <td><strong>班级编号</strong></td>
        <td th:text="${classinfo.classno}"></td>
    </tr>
    <tr>
        <td><strong>班级名称</strong></td>
        <td th:text="${classinfo.classname}"></td>
    </tr>
</table>

<h3>该班级有下列学生</h3>
<table>
    <thead>
    <tr>
        <th>学生编号</th>
        <th>学生姓名</th>
        <th>学生性别</th>
        <th>学生年龄</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="student : ${classinfo.students}">
        <td th:text="${student.id}"></td>
        <td th:text="${student.name}"></td>
        <td th:text="${student.gender}"></td>
        <td th:text="${student.age}"></td>
    </tr>
    </tbody>
</table>

</body>
</html>
